import React,{Component} from 'react';
import './App.css';
import CFooter  from './components/Footer/Footer';
import CHeader from './components/Header/Header';
import { BrowserRouter } from 'react-router-dom'

import RouterView from './router/index'
import routes from './router/config'


class App extends Component{
  constructor(props){
    super(props)
    this.state = {}
  }


  // 生命周期
  componentDidMount(){

  }

  render() {
    return (
      <div className="App">
        <BrowserRouter>
          <header className="App-header">
            <CHeader></CHeader>
            <div className='main'>
              <RouterView routes={routes}></RouterView>
            </div>
            <CFooter></CFooter>
          </header>
        </BrowserRouter>
      </div>
    );
  }
}

export default App;